<template>
  <el-table :data="tableData" border style="width: 100%">
    <el-table-column align="center" prop="account" label="账号" width="150"> </el-table-column>
    <el-table-column align="center" prop="user" label="用户名" width="120"> </el-table-column>
    <el-table-column align="center" prop="authority" label="权限" width="120">
    </el-table-column>
    <el-table-column align="center" prop="status" label="状态" width="120"> </el-table-column>
    <el-table-column align="center" label="操作" width="150">
      <template slot-scope="scope">
        <el-button @click="handleClick(scope.row)" type="text" size="small"
          >查看</el-button
        >
        <el-button type="text" size="small">编辑</el-button>
        <el-button type="text" size="small">删除</el-button>
      </template>
    </el-table-column>
  </el-table>
</template>

  <script>
export default {
  methods: {
    handleClick(row) {
      console.log(row);
    },
  },

  data() {
    return {
      tableData: [
        {
          account: "admin",
          user: "管理员",
          authority: "管理员",
          status: "1",
        },
        {
          account: "pm10001",
          user: "用户1",
          authority: "lazada",
          status: "1",
        },
        {
          account: "pm10002",
          user: "用户2",
          authority: "tiktok",
          status: "1",
        },
        {
          account: "pm10003",
          user: "用户3",
          authority: "shopee",
          status: "1",
        },
      ],
    };
  },
};
</script>